<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Product extends CI_Controller {

    function __construct(){
        parent::__construct();
        $this->load->model('product_model');
    }

    function index(){
        $data['result'] = $this->product_model->limit(12)->order_by('title', 'asc')->get_many_by(array('active_flag' => ACTIVE_FLAG, 'delete_flag' => UNDELETE_FLAG, 'draft' => DRAFT_NO));
        $data['tpl'] = 'product/index';
        $this->load->view('_layout/index', $data);
    }
}